Many types of input devices are presently available for performing operations in a computing system, such as buttons or keys, mice, trackballs, joysticks, touch sensor panels, touch screens and the like. Touch screens, in particular, are becoming increasingly popular because of their ease and versatility of operation as well as their declining price. Touch screens can include a touch sensor panel, which can be a clear panel with a touch-sensitive surface, and a display device such as a liquid crystal display (LCD) that can be positioned partially or fully behind the panel so that the touch-sensitive surface can cover at least a portion of the viewable area of the display device. Touch screens can allow a user to perform various functions by touching the touch sensor panel using a finger, stylus or other object at a location often dictated by a user interface (UI) being displayed by the display device. In general, touch screens can recognize a touch and the position of the touch on the touch sensor panel, and the computing system can then interpret the touch in accordance with the display appearing at the time of the touch, and thereafter can perform one or more actions based on the touch. In the case of some touch sensing systems, a physical touch on the display is not needed to detect a touch. For example, in some capacitive-type touch sensing systems, fringing electrical fields used to detect touch can extend beyond the surface of the display, and objects approaching near the surface may be detected near the surface without actually touching the surface.
In addition to touch panels/touch screens, many electronic devices may also have mechanical inputs (or mechanical input mechanisms), such as buttons, switches, and/or knobs. These mechanical inputs can control power (i.e., on/off) and volume for the electronic devices, among other functions. Some devices may utilize various types of encoders for obtaining and collecting input data for the device. For example, an optical encoder may consist of a light source that shines light onto a wheel which then reflects the light onto a sensor. The optical encoder can be used to detect rotation of the wheel may be determined and interpret the rotation as a mechanical input to the device.